﻿using System;
using System.Collections.Generic;

using E.BLL;
using E.Model;
using E.Enum;
using E.Web.UI.Page;

namespace E.Web.Teacher.frames
{
    public partial class Manager : TeacherBasePage
    {
        public IList<ShortNoticeModel> noticeList;
        public int unreplyQnACount = 0;

        protected override void ShowPage()
        {
            SearchNoticeModel searchModel = new SearchNoticeModel();
            searchModel.Title = "";
            searchModel.PublisherID = -1;
            searchModel.CategoryID = -1;
            searchModel.SysSelection = authority == EnumTeacherAuthority.Internals ? -1 : 1;
            searchModel.FromDate = "";
            searchModel.ToDate = "";
            searchModel.AreaID = areaid;
            searchModel.CertificateID = authority == EnumTeacherAuthority.Internals ? (new TeacherBLL()).GetTeacherProjectID(teacherid) : -1;

            NoticeListModel noticeListModel = new NoticeListModel();

            noticeListModel = (new NoticeBLL()).GetNoticeListByCondition(searchModel, config.DefaultShortNoticeQuantity, 0);

            noticeList = noticeListModel.List;

            if (authority == EnumTeacherAuthority.Normal)
            {
                unreplyQnACount = (new TeacherBLL()).GetUnreplyQnACount(teacherid);
            }
        }

        protected void Page_Load(object sender, EventArgs e)
        {

        }
    }
}
